package com.goldenautumn.prefabricate.business.service

import com.goldenautumn.prefabricate.business.entity.AddCarGoodsParams
import com.goldenautumn.prefabricate.business.entity.BasicPage
import com.goldenautumn.prefabricate.business.entity.CarDataList
import com.goldenautumn.prefabricate.business.entity.GoodsDetailsReq
import com.goldenautumn.prefabricate.business.entity.GoodsInfoVO
import com.goldenautumn.prefabricate.business.entity.HomeDataVo
import com.goldenautumn.prefabricate.business.entity.HomeTabVo
import com.goldenautumn.prefabricate.business.entity.TypeGoodsResp
import com.goldenautumn.prefabricate.business.entity.TypeInfoVo
import com.goldenautumn.prefabricate.utils.Constants.BASE_URL
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.QueryMap

interface MallService {

    /***
     * 商品列表
     * @return
     */
    @GET("$BASE_URL")
    suspend fun getGoodsList(@QueryMap map :HashMap<String,Any>): BasicPage<GoodsInfoVO>

    /***
     * 首页分类TAB
     * @return
     */
    @GET("$BASE_URL")
    suspend fun onTabList(@QueryMap map :HashMap<String,Any>): List<HomeTabVo>

    /***
     * 商品详情
     * @return
     */
    @GET("$BASE_URL")
    suspend fun getGoodsDetails(@QueryMap map :HashMap<String,Any>): GoodsDetailsReq

    /***
     * 首页信息
     * @return
     */
    @GET("$BASE_URL")
    suspend fun getHomeData(@QueryMap map :HashMap<String,Any>): HomeDataVo

    /***
     * 添加至购物车
     * @return
     */
    @POST("$BASE_URL")
    suspend fun addCarGoods(@QueryMap map :HashMap<String, Any>,@Body params: AddCarGoodsParams): Any

    /***
     * 减少购物车商品数量
     * @return
     */
    @POST("$BASE_URL")
    suspend fun subCarGoods(@QueryMap map :HashMap<String, Any>,@Body params: AddCarGoodsParams): Any

    /***
     * 购物车列表
     * @return
     */
    @GET("$BASE_URL")
    suspend fun getCarList(@QueryMap map :HashMap<String, Any>): CarDataList

    /***
     * 删除购物车数据
     * @return
     */
    @POST("$BASE_URL")
    suspend fun deleteCarData(@QueryMap map :HashMap<String, Any>,@Body params: HashMap<String, Any>): Any

    /***
     * 分类商品
     * @return
     */
    @POST("$BASE_URL")
    suspend fun categoryList(@QueryMap map :HashMap<String, Any>): TypeGoodsResp


}